#ifndef _EVENTS_H
#define _EVENTS_H

#include <qobject.h>

#include "accelerometer.h"
#include "soundprovider.h"
#include "mainwindow.h"

/**
 * Class used mainly for hooking signals and UI-events together.
 * Requires reference to MainWindow for self-explanatory reasons.
 */
class Events : public QObject
{
	Q_OBJECT
private:
	MainWindow *m_main;
	Accelerometer *m_accelerometer;
        Soundprovider *m_sounds;

public:
        Events(MainWindow *main, Accelerometer *accelerometer, Soundprovider *soundplayer)
	: m_main(main), m_accelerometer(accelerometer), m_sounds(soundplayer) {}

	/** Maps signals and slots together. */
	void createActions();

private slots:
	/** used to update values in ui */
	void updateValues(double x, double y, double z, double amp);
};

#endif // EVENTS_H
